package sept.jasonparser2;


 
import java.io.InputStream;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

 
public class JsonParser2Activity extends Activity {
 
    /** Called when the activity is first created. */
 EditText etURL;
 String siteURL;
 SearchResponse searchResponse;
 InputStream data;
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
     
     etURL = (EditText)findViewById(R.id.etURL);
     siteURL = "http://search.twitter.com/trends.json";
     etURL.setText(siteURL);
        

 }
    
    public void GsonExecute(View view ) {
        switch (view.getId()) {
        case R.id.bGsonExecute:
            searchResponse.runJSONParser();
            break;
            
        case R.id.bGetGsonData :
            data = searchResponse.getJSONData(siteURL);
            break;
            
        }
        
    }
}